package net.kazed.nextaction.task;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;

public class ContactAttachmentViewActivity extends Activity {
    
    private static final String TAG = "ContactAttachmentViewActivity";
    
    private Uri itemUri;
    
    @Override
    protected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        Intent intent = getIntent();
        this.itemUri = intent.getData();
    }

    @Override
    protected void onResume() {
        super.onResume();
        Log.d(TAG, "onResume()");
        Intent intent = new Intent(Intent.ACTION_VIEW, itemUri);
        startActivityForResult(intent, 0);
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode,
            Intent data) {
        Log.d(TAG, "Got resultCode " + resultCode + " with data " + data);
        finish();
    }
}
